home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Utilities / BenchMarks / ByteBenchmark / doc / bench.doc next >
Text File  |  1994-01-27  |  15KB  |  228 lines

  1. @BT
  2.  
  3. [TITLE]BYTE's UNIX Benchmarks
  4. [DEK]Separating fact from fiction in the exploding UNIX empire
  5. [TOC]Before you jump into the UNIX pool, see how your favorite system stacks
  6. up against the rest of the pack.
  7.  
  8. Ben Smith
  9.  
  10. In making purchase decisions, it's difficult to know whom to believe. Each
  11. vendor claims, predictably, that their products are better than the
  12. competition's, but how does one prove, or debunk, these claims?
  13.   Cost and performance typically top the list of considerations for those
  14. seeking to purchase equipment, and while cost can be easily compared,
  15. performance cannot, and comparing costs without analyzing each system's
  16. relative value is a worthless exercise.
  17.   When DOS became popular, it allowed for the development of performance
  18. measurement programs, benchmarks, that would run on any system that ran DOS.
  19. BYTE's lab technicians set about creating their own, and the BYTE DOS
  20. benchmarks were born. Dozens of systems have been clocked using these
  21. facilities, and each review of a new DOS-based system includes the results of
  22. these benchmarks.
  23.   This is all very well, but while DOS is installed on a great many systems,
  24. it is no longer the !ITAL!only!ENDITAL! popular multi-platform operating
  25. system. User demands for greater expandability, better performance and
  26. multi-tasking have turned UNIX systems into one of the fastest growing
  27. segments of the market. When UNIX stepped from minicomputers to workstations,
  28. it established itself as the defacto OS for an exciting new breed of machine.
  29. Now, with solid implementations for affordable Intel and Motorola-based
  30. platforms, UNIX is making a name for itself in the PC realm. As UNIX finds
  31. its way into the mainstream, it is necessary to have the tools to objectively
  32. measure not only the performance of various hardware platforms, but of
  33. different versions of UNIX as well.
  34.  
  35. !SUBHED!Unix is Not MS-DOS!ENDSUBHED!
  36. Conceptually, BYTE's UNIX benchmarks are the same as BYTE's MS-DOS
  37. benchmarks: We have combined evaluation of both low-level operations and
  38. high-level applications type programs to highlight the performance of the
  39. entire system.
  40.   But UNIX is considerably different from MS-DOS. In the first place, it is a
  41. !ITAL!multi!ENDITAL!-tasking, !ITAL!multi!ENDITAL!-user operating system. It
  42. is also portable, able to run on many different kinds of computers. MS-DOS is
  43. a !ITAL!single!ENDITAL!-tasking, !ITAL!single!ENDITAL!-user operating system,
  44. and it is intended to run on essentially one kind of computer, an IBM-PC or
  45. PC ``clone,'' utilizing a specific class of processor from Intel. As a
  46. result, the UNIX benchmarks differ from their MS-DOS counterparts. Even
  47. though there are some equivalent low-level tests, you will find that even
  48. these run differently; the popular Dhrystone benchmark commonly gives
  49. different results, on the same hardware, when run under both DOS and UNIX.
  50. The reason? Different compilers are being used, and the underlying operating
  51. systems and services are wildly different.
  52.   Another important difference is that Microsoft is the only real source of
  53. DOS; other suppliers simply repackage Microsoft's basic operating system
  54. under other names. In contrast, there are many different kinds of UNIX, and
  55. while similarities exist (the core UNIX from Dell, Everex and Interactive
  56. Systems are virtually the same), there are UNIX and UNIX-like operating
  57. systems that differ greatly from one another. Conclusion: The UNIX benchmarks
  58. are evaluating the implementation of UNIX and the resident compiler as well
  59. as the hardware on which it is running (the MS-DOS and Apple Macintosh
  60. benchmarks use a common compiler, the public-domain Small C).
  61.   With so many variables, what is constant? Well, we have established a
  62. baseline, SCO Xenix 386 version 2.3.1. running on the Everex 386/33 with 4
  63. Mbytes of RAM and an 80387 math coprocessor. While it isn't UNIX per se
  64. (because AT&T decides which implementations may be called ``UNIX''), it is
  65. more popular than any other PC UNIX implementation. It is specifically
  66. designed for 80386-based computers with full 32 bit memory access. The Everex
  67. 386/33 was chosen because it is one of today's highest performance 386
  68. computers properly configured to run the full 32 bit operating system. (Some
  69. 386 computers cannot access memory through single 32 bit operations; small
  70. matter if you are just running MS-DOS, an 8 bit operating system, but serious
  71. if you want to run UNIX.) This combination of system and OS is timely, but
  72. we'll continue to adjust the baseline as needed to reflect the installed PC
  73. and workstation UNIX base.
  74.  
  75. !SUBHED!The Low Level Bench Programs!ENDSUBHED!
  76. The BYTE UNIX benchmarks consist of eight groups of programs: arithmetic,
  77. system calls, memory operations, disk operations, dhrystone, database
  78. operations, system loading, and miscellaneous. These can be roughly divided
  79. into the low-level tests (arithmetic, system calls, memory, disk, and
  80. dhrystone) and high-level tests (database operations, system loading, and the
  81. C-compiler test that is part of the miscellaneous set).
  82.   The Dhrystone test is known more formally as ``Dhrystone 2''. It performs
  83. no floating-point operations, but it does involve arrays, character strings,
  84. indirect addressing, and most of the non-floating point instructions that
  85. might be found in an application program. It also includes conditional
  86. operations and other common program flow controls. The output of the test is
  87. the number of dhrystone loops per second. It is used in the BYTE benchmarks
  88. because of its wide selection of operations and because it is one of the most
  89. widely run benchmark programs.
  90.   A future version of the BYTE UNIX benchmarks will include the Whetstone
  91. benchmark test program, as well. The Whetstone benchmark is conceptually
  92. similar to the Dhrystone, but with an emphasis on math; it is a mix of
  93. floating point and integer arithmetic, function calls, array operations,
  94. conditionals, and transcendental function calls.
  95.   All the arithmetic tests have the same source code with different data
  96. types substituted for the operations: register, short, int, long, float,
  97. double, and an empty loop for calculating the overhead required by the
  98. program. The actual test involves assignment, addition, subtraction,
  99. multiplication, and division. Very simple. But don't bother running the float
  100. and double precision test unless you have a math co-processor; what takes a
  101. math co-processor system 15 seconds, may take an unaided processor 30 minutes
  102. or more!
  103.   The system call tests are: system call overhead, pipe throughput, pipe
  104. context switching, spawning of child processes, execl (replacement of the
  105. current process by a new process), and file read, write, and copy. The system
  106. call overhead test evaluates the time required to do iterations of
  107. !MONO!dup()!ENDMONO!, !MONO!close()!ENDMONO!, !MONO!getpid()!ENDMONO!,
  108. !MONO!getuid()!ENDMONO!, and !MONO!umask()!ENDMONO! calls.
  109.   The pipe throughput test has no real counterpart in real-world programming;
  110. in it, a single process opens a pipe (an inter-process communications channel
  111. that works rather like its plumbing namesake) to itself and spins a megabyte
  112. around this short loop. You might call this the pipe overhead test. The
  113. context switching pipe test is more like a real-world application; the test
  114. program spawns a child process with which it carries on a bi-directional pipe
  115. conversation.
  116.   The spawn test creates a child process which immediately dies after its own
  117. !MONO!fork()!ENDMONO!. The process is repeated over and over. Similarly, the
  118. exec test is a process that repeatedly changes to a new incarnation. One of
  119. the arguments passed to the new incarnation is the number of remaining
  120. iterations (there has to be some control, after all).
  121.  The file read, write, and copy tests capture the number of characters that
  122. can be written, read, and copied in a specified time (default is 10 seconds).
  123. If you run this test with the minimum element (1 second), you should see a
  124. significantly higher value for all operations if your system implements disk
  125. cacheing. Be sure you have plenty of disk space before you run this test.
  126.  
  127. !SUBHED!The High-Level Bench Programs!ENDSUBHED!
  128. To qualify as a high-level test, the test must involve operations that a
  129. real-world application program might employ, including heavy use of the CPU
  130. and disk. At the time of writing this article, we have currently implemented
  131. only the system loading and database tests, but we will be adding several new
  132. tests in the months ahead.
  133.   The system loading test is a shell script that is run by 1, 2, 4, and 8
  134. concurrent processes. The script consists of an alphabetic sort one file to
  135. another; taking the octal dump of the result and doing a numeric sort to a
  136. third file; running grep on the result of the alphabetic sort file;
  137. !MONO!tee!ENDMONO!ing the result to a file and to !MONO!wc!ENDMONO! (word
  138. count); writing the final result to a file; and removing all of the resulting
  139. files. This script was used in the original BYTE UNIX benchmarks (1983), but
  140. the source file is several magnitudes larger than the original.
  141.   The C compile and link is nothing more than that.
  142.   The database operations consist of random read, write, and add operations
  143. on a database file. The operations are handled by a server process; the
  144. requests come from client processes. The test is run with 1, 2, 4, and 8
  145. client processes. The test employs semaphores and message queues. Semaphores
  146. are being used less and less these days. BSD systems use sockets instead in
  147. place of both of these System V.3 IPC utilities. System V.4 offers both. This
  148. test is being rewritten using sockets, but since Xenix doesn't implement
  149. sockets, our baseline configuration becomes instantly obsolete when we
  150. replace the database test. Just another one of those little problems in
  151. trying to create journalistic computer benchmarks: any program that has been
  152. fully debugged is probably obsolete [ Murphy, et al ].
  153.  
  154. !SUBHED!Miscellany!ENDSUBHED!
  155. The remaining tests are in the miscellaneous group: Tower of Hanoi (a test of
  156. recursive operations) and a test of the UNIX arbitrary precision calculator
  157. calculating the square root of two to 99 decimal places.
  158.   No doubt, we will be adding tests to this suite as we see the need to test
  159. and evaluate from different perspectives.
  160.  
  161. !SUBHED!Problems in the Modern World!ENDSUBHED!
  162. The major problem we have had with developing the UNIX benchmark programs is
  163. designing them so that they fairly reflect the strengths and weaknesses of
  164. all the systems on which we anticipate using them. For example, the
  165. operations should allow RISC machines to give appropriately high performance
  166. for the sorts of operations that RISC is good for, and should also illustrate
  167. improvements provided by faster bus speeds, better math coprocessors and the
  168. like. In the case of RISC, the efficiency of the compiler is of utmost
  169. importance; RISC compilers must rearrange instructions to take advantage of
  170. instruction pipelining (for an overview of RISC, see BYTE, May 1988).
  171.   The majority of the UNIX systems that we look at employ disk caching. This
  172. is especially important because modern UNIX includes swapping and paging out
  173. to disk when there is insufficient memory for a task or the number of tasks.
  174. It is an interesting exercise to run the disk file operations test with
  175. increasingly large files and note the point at which performance drops.
  176.  
  177. !SUBHED!How They Work!ENDSUBHED!
  178. A 400 line Bourne shell script (!MONO!Run!ENDMONO!) administers the
  179. benchmarking system. After the evaluation of the command line options, the
  180. benchmarking operation for each test has three stages: parameter setup,
  181. timing the execution of the test, and calculation/formatting operations (see
  182. Figure 1). After !MONO!Run!ENDMONO! determines the parameters for the test,
  183. it sends a formatted description to the output file. !MONO!Run!ENDMONO! then
  184. invokes the specific test by means of the UNIX command !MONO!time!ENDMONO!.
  185. The output of !MONO!time!ENDMONO! and any output from the test itself end up
  186. in a raw data file. Most tests are run six times so that any variance can be
  187. averaged. On completion of a set of tests, !MONO!Run!ENDMONO! invokes a
  188. cleanup script, which does the statistical calculations on the raw data using
  189. the !MONO!awk!ENDMONO! formatting language.
  190.   The greater part of the benchmark programs are written in C and are
  191. compiled on the test machine prior to running the tests. 
  192.  
  193. !SUBHED!Using the Results!ENDSUBHED!
  194. If all you need is a raw measure of performance, then feel free to use the
  195. Dhrystone and Whetstone tests as indices of just that. But if you want to use
  196. the benchmarks to evaluate a machine's ability to serve some real need, then
  197. you should do the following:
  198. 1. Analyze your requirements as far as the type of computing, amount and type
  199. of communications I/O, and amount and type of disk I/O.
  200. 2. Score the subject machines using weighting factors that reflect your
  201. requirements.
  202. 3. Generate a price vs. performance plot.
  203. 4. Use the price vs. performance, along with information about the
  204. reliability servicability of the hardware.
  205.   Step 4 is really more of an art than anything else. It is extremely
  206. important, however, to not rely on price vs. performance alone.
  207.  We use our UNIX Benchmarks for doing a rough analysis and comparison of
  208. divergent machines. (See figure 2, ``UNIX Machines Tested.'') As you can see,
  209. we even go so far as to generate a single index number, a sort of reduction
  210. of all of the benchmark tests to a single value. This index is generated by
  211. summing the the individual indices of the dhrystone test, the floating point
  212. test, the shell test with eight concurrent processes, the C compiler time,
  213. the !MONO!dc!ENDMONO! routine, and the tower of hanoi time. By definition,
  214. the combined index for the baseline machine is six. Indicess above six imply
  215. a better overall performance than the baseline machine; indices less than
  216. six, worse performance. Always keep in mind that having a single index rating
  217. for a machine may make good cocktail conversation, but it is incredibly
  218. simplistic. It is like reducing a complex sculptural shape to a single point;
  219. you no longer can tell what you are looking at. This number doesn't reflect
  220. any real-world use of a UNIX system. However, the index is devised so that it
  221. gives an overall indication of different kinds of system operations and so is
  222. valuable to our reviews.
  223.   BYTE's UNIX benchmarking suite is small enough to port easily to any UNIX
  224. system, yet diverse and flexible enough to be useful for a wide spectrum of
  225. benchmarking requirements. Besides, they're in the public domain, so they can
  226. be obtained for little, if any, cost. What better reason do you need to use
  227. them?
  228.